package com.atguigu08._interface;

/**
 * ClassName: interfaceTest
 * Package: com.atguigu08._interface
 * Description:
 *
 * @Author ZY
 * @Create 16:23
 * @Version 1.0
 */
public class interfaceTest {

    public static void main(String[] args) {

        System.out.println(Flayable.MIN_SPEED);
        System.out.println(Flayable.MAX_SPEED);

//        Flayable.MAX_SPEED = 7800;

        Bullet b1 = new Bullet();

    }

}

interface Flayable{//接口
    //全局常量(static final)
    public static final int MIN_SPEED = 0;

    //可以省略public static final
    int MAX_SPEED = 7900;

    //方法,可以省略public abstract
    void fly();

}

interface Attackable{
    public abstract void attack();
}


abstract class Plane implements Flayable{

}


class Bullet implements Flayable,Attackable{

    @Override
    public void fly() {
        System.out.println("子弹飞");
    }

    @Override
    public void attack() {
        System.out.println("子弹攻击");
    }
}